<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>选择器续</title>
    <style>
        /* 后代选择器 */
        body div div p{
            color: red;
            /* 选择到的是p3和p4 */
        }
        body>div>div>p{
            color: blue;
        }
        a:link{
            color: blue;
        }
        a:visited{
            color: gray;
        }
        a:hover{
            color: rebeccapurple;
        }
        a:active{
            color: green;
        }
    </style>
</head>
<body>
    <a href="http://www.baidu.com">超链接1</a>
    <a href="http://www.baidu.com">超链接2</a>
    <p>p1</p>
    <div>
        <p>p2</p>
    </div>
    <div>
        <div>
            <p>p3</p>
        </div>
        <div>
            <div>
                <p>p4</p>
            </div>
        </div>
    </div>
</body>
</html>